var _contract = null;
function setPrintData(contract) {
  _contract = contract;
  _prt.setPageSize(210, 297);
  _prt.setMargin(15,15,15,15);
  _prt.setLineHeight(5);
  _prt.setPageFoot(" {pg}/2                                        电子合同校验码："+contract.printVerifyCode);

  _prt.add(["sf", "12pt 黑体"]);
  _prt.add(["dt", "Change of Membership information 会籍资料变更合同", 15, 15 + 12]);
  _prt.add(["sp", 0, 0]);
  _prt.add(["pi", "/images/logo.png", 50, 10]);
  _prt.add(["nl", 1]);
  _prt.add(["pl"]);

  _prt.add(["pt", "原合同信息："]);
  _prt.add(["nl", 0.2]);
  _prt.add(["sf", "9pt 宋体"]);
  _prt.add(["nt", "Home Club 专属会所："+contract.shopName, 0.5]);
  _prt.add(["nt", "Membership NO. 会员编号："+contract.memberCode, 0.5]);
  _prt.add(["nt", "Membership Consultant 会籍顾问："+contract.salesName+" "+contract.salesName2, 0.5]);
  _prt.add(["nt", "Contract No. 合同编号："+contract.contractCode, 0.5]);
  _prt.add(["nl", 1]);
  _prt.add(["pt", "Name 姓名："+contract.memberName]);
  _prt.add(["pt", "ID/Passport NO.身份证/护照号码："+contract.idNumber]);
  _prt.add(["nt", "Membership Type 会员卡卡种："+contract.cardTypeName, 0.5]);
  _prt.add(["nt", "Membership Fee 会费："+contract.factPrice+"元", 0.5]);
  _prt.add(["nl", 1]);
  _prt.add(["pt", "From the beginning of the Contract 会籍开始日期："+contract.beginTime]);
  _prt.add(["pt", "From the end of the contract       会籍结束日期："+contract.endTime]);
  _prt.add(["pl"]);

  _prt.add(["sf", "12pt 黑体"]);
  _prt.add(["pt", "受让会员合同信息："]);
  _prt.add(["nl", 0.2]);
  _prt.add(["sf", "9pt 宋体"]);
  _prt.add(["nt", "Membership NO. 会员编号："+contract.newMemberCode, 0.5]);
  _prt.add(["nt", "Contract No. 合同编号："+contract.newContractCode, 0.5]);
  _prt.add(["nl", 1]);
  _prt.add(["pt", "Name 姓名："+contract.newMemberName]);
  _prt.add(["pt", "ID/Passport NO.身份证/护照号码："+contract.newIdNumber]);
  _prt.add(["nt", "Membership Type 会员卡卡种："+contract.newCardTypeName, 0.5]);
  _prt.add(["nt", "Membership Fee 会费："+contract.newFactPrice+"元", 0.5]);
  _prt.add(["nl", 1]);
  _prt.add(["pt", "From the beginning of the Contract 会籍开始日期："+contract.newBeginTime]);
  _prt.add(["pt", "From the end of the contract       会籍结束日期："+contract.newEndTime]);
  _prt.add(["nt", "Received 已收转让费金额："+contract.payAmount+"元", 0.5]);
  _prt.add(["nt", "Deposit 定金："+(contract.earnestAmount==0?"-":(contract.earnestAmount+"元")), 0.5]);
  _prt.add(["nl", 1]);
  _prt.add(["pl"]);

  _prt.add(["nl", 1]);
  _prt.add(["pt", "I understand and agree to the starting date. Please provide your signature."]);
  _prt.add(["pt", "我明白及同意以此日期生效签署"]);
  _prt.add(["pl"]);

  _prt.add(["sf", "12pt 黑体"]);
  _prt.add(["pt", "Club Rules 会员章程"]);
  _prt.add(["nl", 0.2]);
  _prt.add(["sf", "9pt 宋体"]);

  _prt.add(["pt", "over 6 months(include 6 months membership).lable for members who has joined2）"]);
  _prt.add(["pt", "会籍冻结服务仅限会籍在六个月以上（含六个月）之会员。"]);
  _prt.add(["pt", " Membership suspension is only avai reasonable reason.1）任何会籍冻结申请必须有充分之理由才可能被公司接受。"]);
  _prt.add(["pt", " Any membership suspension must haved of suspension.rds during the perio6）"]);
  _prt.add(["pt", "会籍冻结期间，会员卡必须交还所在会所保管。 "]);
  _prt.add(["pt", "Member must return their membershiop camediately when it accept.d be paid imension fee shoul5）会籍保留费用必须于申请会籍冻结被接受时即时支付。 "]);
  _prt.add(["pt", "The susp.by the member in person or in written at least one month beforecation must be done4）申请会籍冻结必须由会员本人于会籍冻结之日前一个月或之前以书面形式向所在会所提出。 The suspension applirged for the suspension.100 yuan per month will be cha3）会籍冻结期间，会员必须支付每月壹佰（100）元会籍冻结费用。 the suspension period.application for suspension should be made in person beforeupon production of doctor advice and charged for 100 yuan. The uspended for a max period of 12 monthsmbership may be sent of pregnancy,me办理，并需要在会籍冻结开始前办理。 In the ev10）女性会员因怀孕可享受连续不多于12个月的会籍冻结，会籍保留费用仅一次性按一个月的标准收取。但必须事前持有效证明至会所亲自or without assigning any reason therefor.application for suspension membership for any reason whatsover he right to reject anyent reserves t9）所在会所有绝对权利拒绝任何有损本会所利益之会籍冻结申请而无需任何解释。 The Managemd has conseted by the Club.members come to apply for extension of the suspension period an notice the members,unlesstore the membership withoutspension,the club will res无需征得会员同意。 After the expiry date of su8）会籍冻结期到期后，除非会员及时到所在会所办理会籍续冻手续并征得会所同意，否则会所将从该日期开始视作该会员已恢复使用会籍而s the end of the suspension.advance,the membership will re-start immediately,and regarded anclude personal training course).If members use inthe suspension period,members cannot sue any part of the club(ing7）会员在会籍冻结期间不得使用本会所（包括不得使用私人教练课程）。如果提前使用，会员冻结期即日启动，并视为完整结束。 Duri会籍冻结 Suspensioncharged.immediately and apply for a new card,100 yuan per card will be t,it should be reportedIf membership card los2）会员卡一旦遗失，应立即报失，并办理补卡手续，支付人民币壹佰（100）元一张。 ing the Club.ard must be presented before enter1）会员进入本会所必须出示会员卡 Membership cadministration fee:ld be charged for the belownsfer/Change Club shou所有会籍转让/转店需要按以下金额收取行政费： All Membership Trayuan+club price difference4）转店费-人民币800元+门店差价 Change Club-800 City Membership-2400 yuan3）全市通会籍-人民币2400元 Transfer All 2）会员转会员-人民币500元 Transfer between members-500 yuan non-member-800 yuan1）会员转非会员-人民币800元 Transfer to会籍转让/转店 Membership Transfer/Change Club会员卡 Membership card"]);
  _prt.add(["pt", ""]);
  _prt.add(["pt", "I have read,understood and accepted the rules and regulations f the club at the back of this application form."]);
  _prt.add(["pt", "本人已经阅读并同意遵守此申请表之会所守则及规条。"]);

  _prt.add(["nl", 1]);
  _prt.add(["nt", "Member Signatre 会员签名：", 0.5]);
  if(contract.memberSign) {
    _prt.add(["my", -4]);
    _prt.add(["pi", contract.memberSign, 25, 8]);
  } else {
    _prt.add(["nl", 1]);
  }
  _prt.add(["pt", "Date 日期："+contract.saleDate]);

  _prt.add(["nl", 2]);
  _prt.add(["sf", "12pt 黑体"]);
  _prt.add(["nt", contract.companyName, 0.5]);
  _prt.add(["my", -13]);
  _prt.add(["mx", -20]);
  if(contract.sealPic) _prt.add(["pi", contract.sealPic, 39, 39]);
  _prt.add(["sf", "9pt 宋体"]);

  _prt.add(["nl", 5]);
  _prt.add(["pt", "合同打印日期: "+contract.printDate]);
  _prt.add(["pt", "合同打印人: "+contract.printUserName]);
  _prt.add(["pt", "合同打印门店: "+contract.printShopName]);
}

function printOk() {
  if(_contract) {
    getJson("_print?saleId="+_contract.saleId+"&contractType=05", function(data){
      if(data.ret) cload();
    });
  }
}